package io.geekidea.springbootplus.system.service;

import io.geekidea.springbootplus.system.entity.Task;
import io.geekidea.springbootplus.system.param.TaskPageParam;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.system.vo.TaskQueryVo;
import io.geekidea.springbootplus.framework.core.pagination.Paging;

import java.util.Date;
import java.util.List;
import java.io.Serializable;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

/**
 *  服务类
 *
 * @author miko
 * @since 2020-10-25
 */
public interface TaskService extends BaseService<Task> {

    /**
     * 保存
     *
     * @param task
     * @return
     * @throws Exception
     */
    boolean saveTask(Task task) throws Exception;

    List<Task> getToDoTask(int schoolID, String parcelCenterName, Date deadline, String workType) throws Exception;

    List<Task> getToDoAndDoneTask(int schoolID, String parcelCenterName, Date deadline, String workType,String searchText) throws Exception;

    /**
     * 修改
     *
     * @param task
     * @return
     * @throws Exception
     */
    boolean updateTask(Task task) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    boolean deleteTask(Long id) throws Exception;

    /**
     * 根据ID获取查询对象
     *
     * @param id
     * @return
     * @throws Exception
     */
    TaskQueryVo getTaskById(Serializable id) throws Exception;


    List<Task> getAllList(LambdaQueryWrapper<Task> wrapper) throws Exception;

    /**
     * 获取分页对象
     *
     * @param taskQueryParam
     * @return
     * @throws Exception
     */
    Paging<TaskQueryVo> getTaskPageList(TaskPageParam taskPageParam) throws Exception;


}
